<?php require_once('../Connections/parkwaydb_connection.php'); ?>
<?php
//initialize the session
if (!isset($_SESSION)) {
  session_start();
}
define ('MAX_FILE_SIZE', (1024 * 1024)*3); // 3 MB

// ** Logout the current user. **
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){
  $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  $_SESSION['MM_Username'] = NULL;
  $_SESSION['MM_UserGroup'] = NULL;
  $_SESSION['PrevUrl'] = NULL;
  $_SESSION['ParentID'] = NULL;
  unset($_SESSION['ParentID']);
  unset($_SESSION['MM_Username']);
  unset($_SESSION['MM_UserGroup']);
  unset($_SESSION['PrevUrl']);
	
  $logoutGoTo = "../index.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "1";
$MM_donotCheckaccess = "false";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 

  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && false) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}

$MM_restrictGoTo = "login.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php



if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}


if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
global $uploadfile;
$uploadfile = "";
if (array_key_exists('upload', $_POST)) { 
    // define constant for upload folder 
    define('UPLOAD_DIR', '../gallery/'); 
	
    // replace any spaces in original filename with underscores 
    
    $uploadfile = str_replace(' ', '_', $_FILES['pictures_filename']['name']); 
	
	$pos = strrpos($uploadfile, ".");
	$thumbfile = substr($uploadfile, 0, $pos)."_thumb.jpg";	
	
    // create an array of permitted MIME types 
    $permitted = array('image/gif', 'image/jpeg', 'image/jpg', 'image/pjpeg', 'image/png'); 
      
    // upload if file is OK 
    if (in_array($_FILES['pictures_filename']['type'], $permitted) && ($_FILES['pictures_filename']['size'] > 0) && ($_FILES['pictures_filename']['size'] <= MAX_FILE_SIZE)) { 
      switch($_FILES['pictures_filename']['error']) { 
        case 0: 
          // check if a file of the same name has been uploaded 
          if (!file_exists(UPLOAD_DIR . $uploadfile)) { 
            // move the file to the upload folder and rename it 
            $success = move_uploaded_file($_FILES['pictures_filename']['tmp_name'], UPLOAD_DIR.$uploadfile); 
          } else { 
            $fileresult = 'A file of the same name already exists.'; 
          } 
          if ($success) { 
            $fileresult = "$uploadfile uploaded successfully."; 
          } else { 
            $fileresult = "Error uploading $uploadfile. Please try again."; 
          } 
          break; 
        case 3: 
        case 6: 
        case 7: 
        case 8: 
          $fileresult = "Error uploading $uploadfile. Please try again."; 
          break; 
        case 4: 
          $fileresult = "You didn't select a file to be uploaded."; 
      } 
    } else { 
      $fileresult = "$uploadfile is either too big or not an image."; 
    } 
 }
	$filetochange = UPLOAD_DIR.$uploadfile;
	list($width, $height) = getimagesize($filetochange);
	$aspectratio = (float)$height / (float)$width;
	$newheight = 75; // thumbnail size
	$newwidth = floor($newheight / $aspectratio);
	
	$thumbimg = imagecreatetruecolor($newwidth, $newheight);
	$sourceimg = imagecreatefromstring(file_get_contents($filetochange));
	
	imagecopyresampled($thumbimg, $sourceimg, 0, 0, 0, 0, $newwidth, $newheight, $width, $height);
	imagejpeg($thumbimg, UPLOAD_DIR.$thumbfile, 100);

  $insertSQL = sprintf("INSERT INTO tbl_pictures (pictures_user_id, pictures_class_id, pictures_caption, pictures_filename, pictures_date, pictures_updated, pictures_requiredlevel, pictures_deleted, pictures_description, pictures_thumbnail) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['pictures_user_id'], "int"),
                       GetSQLValueString($_POST['pictures_class_id'], "int"),
                       GetSQLValueString($_POST['pictures_caption'], "text"),
                       GetSQLValueString($uploadfile, "text"),
                       GetSQLValueString($_POST['pictures_date'], "date"),
                       GetSQLValueString($_POST['pictures_updated'], "date"),
                       GetSQLValueString($_POST['pictures_requiredlevel'], "int"),
                       GetSQLValueString($_POST['pictures_deleted'], "int"),
                       GetSQLValueString($_POST['pictures_description'], "text"),
					   GetSQLValueString($thumbfile, "text"));

  mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
  $Result1 = mysql_query($insertSQL, $parkwaydb_connection);
  if (!$Result1) {
	  die(mysql_error()."<br /> $fileresult");
  }

  $insertGoTo = "../gallery.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  header(sprintf("Location: %s", $insertGoTo));
}

$maxRows_newslist = 5;
$pageNum_newslist = 0;
if (isset($_GET['pageNum_newslist'])) {
  $pageNum_newslist = $_GET['pageNum_newslist'];
}
$startRow_newslist = $pageNum_newslist * $maxRows_newslist;

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_newslist = "SELECT news_id, news_date, news_title FROM tbl_news ORDER BY news_date DESC";
$query_limit_newslist = sprintf("%s LIMIT %d, %d", $query_newslist, $startRow_newslist, $maxRows_newslist);
$newslist = mysql_query($query_limit_newslist, $parkwaydb_connection) or die(mysql_error());
$row_newslist = mysql_fetch_assoc($newslist);

if (isset($_GET['totalRows_newslist'])) {
  $totalRows_newslist = $_GET['totalRows_newslist'];
} else {
  $all_newslist = mysql_query($query_newslist);
  $totalRows_newslist = mysql_num_rows($all_newslist);
}
$totalPages_newslist = ceil($totalRows_newslist/$maxRows_newslist)-1;

$maxRows_rated_articles = 5;
$pageNum_rated_articles = 0;
if (isset($_GET['pageNum_rated_articles'])) {
  $pageNum_rated_articles = $_GET['pageNum_rated_articles'];
}
$startRow_rated_articles = $pageNum_rated_articles * $maxRows_rated_articles;

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_rated_articles = "SELECT tbl_rating.id, tbl_rating.total_value, tbl_articles.articles_id, tbl_articles.articles_date, tbl_articles.articles_title FROM tbl_articles, tbl_rating WHERE tbl_rating.id = tbl_articles.articles_id ORDER BY tbl_rating.total_value DESC";
$query_limit_rated_articles = sprintf("%s LIMIT %d, %d", $query_rated_articles, $startRow_rated_articles, $maxRows_rated_articles);
$rated_articles = mysql_query($query_limit_rated_articles, $parkwaydb_connection) or die(mysql_error());
$row_rated_articles = mysql_fetch_assoc($rated_articles);

if (isset($_GET['totalRows_rated_articles'])) {
  $totalRows_rated_articles = $_GET['totalRows_rated_articles'];
} else {
  $all_rated_articles = mysql_query($query_rated_articles);
  $totalRows_rated_articles = mysql_num_rows($all_rated_articles);
}
$totalPages_rated_articles = ceil($totalRows_rated_articles/$maxRows_rated_articles)-1;

$maxRows_linkslist = 5;
$pageNum_linkslist = 0;
if (isset($_GET['pageNum_linkslist'])) {
  $pageNum_linkslist = $_GET['pageNum_linkslist'];
}
$startRow_linkslist = $pageNum_linkslist * $maxRows_linkslist;

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_linkslist = "SELECT links_id, links_title, links_url FROM tbl_links ORDER BY links_id DESC";
$query_limit_linkslist = sprintf("%s LIMIT %d, %d", $query_linkslist, $startRow_linkslist, $maxRows_linkslist);
$linkslist = mysql_query($query_limit_linkslist, $parkwaydb_connection) or die(mysql_error());
$row_linkslist = mysql_fetch_assoc($linkslist);

if (isset($_GET['totalRows_linkslist'])) {
  $totalRows_linkslist = $_GET['totalRows_linkslist'];
} else {
  $all_linkslist = mysql_query($query_linkslist);
  $totalRows_linkslist = mysql_num_rows($all_linkslist);
}
$totalPages_linkslist = ceil($totalRows_linkslist/$maxRows_linkslist)-1;

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_user = "SELECT * FROM tbl_user";
$user = mysql_query($query_user, $parkwaydb_connection) or die(mysql_error());
$row_user = mysql_fetch_assoc($user);
$totalRows_user = mysql_num_rows($user);

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_categories = "SELECT * FROM tbl_category ORDER BY cat_title ASC";
$categories = mysql_query($query_categories, $parkwaydb_connection) or die(mysql_error());
$row_categories = mysql_fetch_assoc($categories);
$totalRows_categories = mysql_num_rows($categories);

mysql_select_db($database_parkwaydb_connection, $parkwaydb_connection);
$query_classes = "SELECT * FROM tbl_class ORDER BY class_year DESC";
$classes = mysql_query($query_classes, $parkwaydb_connection) or die(mysql_error());
$row_classes = mysql_fetch_assoc($classes);
$totalRows_classes = mysql_num_rows($classes);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Arthropod  
Description: A two-column, fixed-width design with dark color scheme.
Version    : 1.0
Released   : 20100422

-->
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/site_template.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>The Parkway Child Care Centre and Beaumont Hills Longday Pre-school - ADMIN</title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<!-- InstanceEndEditable -->

<!-- CSS FILES -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link href="../css/style.css" rel="stylesheet" type="text/css" media="screen" />
<link href="../css/datepicker.css" rel="stylesheet" type="text/css" />

<!-- JAVASCRIPT RELATED FILES -->
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script type="text/javascript" src="../js/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/mosaic.1.0.1.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="../js/datepicker.js"></script>
<script type="text/javascript" src="../js/eye.js"></script>
<script type="text/javascript" src="../js/utils.js"></script>

		
<script type="text/javascript">  
			
			jQuery(function($){
				
				$('.circle').mosaic({
					opacity		:	0.8			//Opacity for overlay (0-1)
				});
				
				$('.fade').mosaic();
				
				$('.bar').mosaic({
					animation	:	'slide'		//fade or slide
				});
				
				$('.bar2').mosaic({
					animation	:	'slide'		//fade or slide
				});
				
				$('.bar3').mosaic({
					animation	:	'slide',	//fade or slide
					anchor_y	:	'top'		//Vertical anchor position
				});
				
				$('.cover').mosaic({
					animation	:	'slide',	//fade or slide
					hover_x		:	'400px'		//Horizontal position on hover
				});
				
				$('.cover2').mosaic({
					animation	:	'slide',	//fade or slide
					anchor_y	:	'top',		//Vertical anchor position
					hover_y		:	'80px'		//Vertical position on hover
				});
				
				$('.cover3').mosaic({
					animation	:	'slide',	//fade or slide
					hover_x		:	'400px',	//Horizontal position on hover
					hover_y		:	'300px'		//Vertical position on hover
				});
		    
		    });
		    
		</script>
<!-- InstanceBeginEditable name="head" -->
<script type="text/javascript">
$(document).ready(function() {
    $("#datepicker").datepicker( {
						changeMonth: true,
						changeYear: true,
						constrainInput: true,
						currentText: 'Now',
						autoSize: true,
						showOn: 'focus',
						dateFormat: 'dd/mm/yy',
						altField: '#pictures_date',
						altFormat: new Date(parseInt($("input[name=test_date]").val(), 10)),
						navigationAsDateFormat: true,
						showAnim: 'fade'
					});
  });
</script>  
<!-- InstanceEndEditable -->
</head>
<body>

<div id="wrapper">

    <div id="header">
        <div id="logo">
            <p><h4><a href="../index.php">Home</a> | <a href="../aboutus.php">About Us</a> | <a href="../contactus.php">Contact Us</a> | <img src="../images/administrator.png" width="16" height="16" alt="Admin" /><a href="index.php">Admin</a> &nbsp;<br /></h4></p>
            <p>
            <a href="javascript:decreaseFontSize()" class="nohover"><img src="../images/font-sizer-down.gif" alt="Decrease font size" width="25" height="25" border="0" /></a>
            <a href="javascript:increaseFontSize()" class="nohover"><img src="../images/font-sizer-up.gif" alt="Increase font size" width="25" height="25" border="0" /></a>
            </p>
        </div>
    </div>

  <div id="spacing"> <br /> </div>  
    
  <div id="menuboxes">
    <div class="mosaic-block bar2">
              <a href="../news.php" title="View Latest News" class="mosaic-overlay">
              <div class="details">
                <h4>News</h4> 
                <p>Check the latest news!</p>
              </div>
              </a>
            <div class="mosaic-backdrop"><img src="../images/1.jpg" width="190" height="200" alt="News"/></div>
        </div>
        <div class="mosaic-block bar2">
              <a href="../gallery.php" title="View the Gallery" class="mosaic-overlay">
              <div class="details">
                <h4>Gallery</h4>
                <p>View pictures</p>
              </div>
              </a>
              <div class="mosaic-backdrop"><img src="../images/2.jpg" width="190" height="200" alt="Gallery"/></div>
        </div>
        <div class="mosaic-block bar2">
              <a href="../linksarticles.php" title="View Articles and Links" class="mosaic-overlay">
              <div class="details">
                <h4>Articles and Links</h4>
                <p>Important articles and links</p>
              </div>
              </a>
              <div class="mosaic-backdrop"><img src="../images/3.jpg" width="190" height="200" alt="Articles and Links"/></div>
        </div>
        <div class="mosaic-block bar2">
              <a href="../staff.php" title="View Staff Information" class="mosaic-overlay">
              <div class="details">
                <h4>Staff</h4> 
                <p>Details on our Staff</p>
              </div>
              </a>
              <div class="mosaic-backdrop"><img src="../images/4.jpg" width="190" height="200" alt="Staff Information"/></div>
        </div>
      </div>

	
  <div id="spacing"> <br /> </div>  
    
  <div id="page">
		<div id="page-bgtop">
				<div id="content"><!-- InstanceBeginEditable name="main_region" --><br />
                <div class="post">
                 <h1 class="title">Add an Image to the Gallery</h1>
                 <p class="meta">What would you like to do?</p>
                 <div style="clear: both;">&nbsp;</div>

<form action="<?php echo $editFormAction; ?>" method="post" enctype="multipart/form-data" id="form1">
  <table>
<?php 
/* 
 //Hide category for now - might bring back later if needed  
    <tr valign="baseline">
      <td align="right">Category:</td>
      
      <td><select name="pictures_cat_id" class="categorylist">
        <?php 
do {  
?>
        <option value="<?php echo $row_categories['cat_id']?>" ><?php echo $row_categories['cat_title']?></option>
        <?php
} while ($row_categories = mysql_fetch_assoc($categories));
?>
      </select></td>
    </tr>
*/
?>
    <tr> </tr>
    <tr valign="baseline">
      <td align="right">Class:</td>
      <td><select name="pictures_class_id"  class="classoption">
        <?php 
do {  
?>
        <option value="<?php echo $row_classes['class_id']?>"><?php echo $row_classes['class_name']." ".$row_classes['class_year']?></option>
        <?php
} while ($row_classes = mysql_fetch_assoc($classes));
?>
      </select></td>
    </tr>
    <tr> </tr>
    <tr valign="baseline">
      <td align="right">Picture Caption:</td>
      <td><input type="text" name="pictures_caption" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right">Filename:</td>
      <td><input name="pictures_filename" type="file" value="" size="45" maxlength="128" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right">Date:</td>
      <td><input type="text" name="pic_date" id="datepicker" value="" size="15" /><input type="hidden" name="pictures_date"  id="pictures_date" value="" size="15" /></td>
    </tr>
    <tr valign="baseline">
      <td align="right">Viewable:</td>
      <td>
      <input type="radio" name="pictures_requiredlevel" value="3" <?php if (!(strcmp(3, ""))) {echo "checked";} ?>/>Public<br />
      <input type="radio" name="pictures_requiredlevel" value="2" <?php if (!(strcmp(2, ""))) {echo "checked";} ?>/>Parents<br />
 <?php /*     
      <select name="pictures_requiredlevel">
        <option value="3" <?php if (!(strcmp(3, ""))) {echo "SELECTED";} ?>>Public</option>
        <option value="2" <?php if (!(strcmp(2, ""))) {echo "SELECTED";} ?>>Parents</option>
      </select></td>
	  */
	  ?>
    </tr>
    <tr valign="baseline">
      <td align="right" valign="top">Description:</td>
      <td><textarea name="pictures_description" cols="50" rows="5"></textarea></td>
    </tr>
    <tr valign="baseline">
      <td align="right">&nbsp;</td>
      <td><input name="upload" type="submit" class="formButton" id="upload" value="Add Image" /></td>
    </tr>
  </table>
  <input type="hidden" name="pictures_user_id" value="<?php echo $row_user['user_id']; ?>" />
  <input type="hidden" name="pictures_deleted" value="0" />
  <input type="hidden" name="pictures_updated" value="<?php print(Date("Y-m-d")); ?>" />
  <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo MAX_FILE_SIZE; ?>" />
  <input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
                </div>
                <!-- InstanceEndEditable --></div>
			<!-- end #content -->
            <div id="sidebar"><!-- InstanceBeginEditable name="sidebar_region" -->
        				<ul>
                            <li>
                              <h2>Administration</h2>
                              <p>
                              <ul>
                              <li>
                                Click <a href="<?php echo $logoutAction ?>">Logout</a> when finished
                              </li>
                              </ul>
                              </p>
                            </li>
						<li>
					    <h2>Date</h2>
                            <ul>
                            <li><?php print(Date("jS M Y")); ?></li>
                            </ul>
						</li>
						<li>
							<h2>News</h2>
							<ul>
                              <?php do { ?>
                                <li><a href="../news.php?news_id=<?php echo $row_newslist['news_id']; ?>"><?php echo $row_newslist['news_title']; ?></a></li>
                                <?php } while ($row_newslist = mysql_fetch_assoc($newslist)); ?>
                            </ul>
						</li>
						<li>
							<h2>Articles</h2>
							<ul>
                              <?php do { ?>
                                <li><a href="../articles.php?articles_id=<?php echo $row_rated_articles['articles_id']; ?>"><?php echo $row_rated_articles['articles_title']; ?></a></li>
                                <?php } while ($row_rated_articles = mysql_fetch_assoc($rated_articles)); ?>
                            </ul>
						</li>
						<li>
							<h2>Links</h2>
							<ul>
								<?php do { ?>
								  <li><a href="<?php echo $row_linkslist['../links_url']; ?>"><?php echo $row_linkslist['links_title']; ?></a></li>
							    <?php } while ($row_linkslist = mysql_fetch_assoc($linkslist)); ?>
                          </ul>
						</li>
					</ul>

        
<!-- InstanceEndEditable --></div>
                    <!-- end #sidebar -->
			  <div style="clear: both;">&nbsp;</div>
		</div>
	</div>
	<!-- end #page -->
</div>

  <div id="spacing"> <br /> </div>  


<div id="footer">
	<p><a href="../index.php">Home</a> | <a href="../aboutus.php">About Us</a> | <a href="../contactus.php">Contact Us</a> | <a href="../news.php">News</a> | <a href="../gallery.php">Gallery</a> | <a href="../linksarticles.php">Links and Articles</a> | <a href="../staff.php">Staff</a> | <a href="index.php">Admin</a></p>
  <p>Copyright &copy; 2011 The Parkway Child Care Centre and Beaumont Hills Longday Pre-school. All rights reserved.<br />
Website Design by Igor Chuprov</p><br />
</div>
<!-- end #footer -->
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($newslist);

mysql_free_result($rated_articles);

mysql_free_result($linkslist);

mysql_free_result($user);

mysql_free_result($categories);

mysql_free_result($classes);
?>
